package com.duke.shaking.pojo;

import java.io.Serializable;

public class UserImage implements Serializable {

	private static final long serialVersionUID = -7356979116584433974L;
	// url for original image
	private String url;
	// url for 100x100 image
	private String url_1;
	// url for 50x50 image
	private String url_5;
	// url for 600x600 image
	private String url_6;
	private String pid;
	public UserImage(String url, String pid) {
		super();
		this.url = formatUrl(url);
		this.pid = pid;
	}
	
	/**
	 * The constructor used when get all photos of a user
	 * @param url
	 * @param url_1
	 * @param pid
	 */
	public UserImage(String url, String url_1, String pid) {
		super();
		this.url = formatUrl(url);
		this.url_1 = formatUrl(url_1);
		this.pid = pid;
	}



	public UserImage(String url, String url_1, String url_5, String url_6,
			String pid) {
		super();
		this.url = formatUrl(url);
		this.url_1 = formatUrl(url_1);
		this.url_5 = formatUrl(url_5);
		this.url_6 = formatUrl(url_6);
		this.pid = pid;
	}

	public String getUrl() {
		return url;
	}
	public String getPid() {
		return pid;
	}
	public String getUrl_1() {
		return url_1;
	}
	public String getUrl_5() {
		return url_5;
	}
	public String getUrl_6() {
		return url_6;
	}
	
	private String formatUrl(String url) {
		return url.replace("\\/", "/");
	}
}
